package cn.bb.bbstudy.service.impl;

import cn.bb.bbstudy.dao.UserInfoDAO;
import cn.bb.bbstudy.pojo.UserInfo;
import cn.bb.bbstudy.service.UserInfoService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class UserInfoServiceImpl implements UserInfoService {

    @Resource
    private UserInfoDAO userInfoDAO;

    @Override
    public int insert(UserInfo record) {
        return userInfoDAO.insert(record);
    }

    @Override
    public int insertSelective(UserInfo record) {
        return userInfoDAO.insertSelective(record);
    }

    public UserInfo selectInfoByUid(String uid) {
        return userInfoDAO.selectInfoByUid(uid);
    }

    public void updateByUid(UserInfo userInfo) {
        userInfoDAO.updateByUid(userInfo);
    }
}

